<header id="topbar">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-active">
                <a href="#op/fruit_part/">水果机参与</a>
            </li>
        </ol>
    </div>
    <div class="topbar-right">
        <div class="ml15 ib va-m" id="toggle_sidemenu_r">
            <a href="#" class="pl5"> <i class="fa fa-sign-in fs22 text-primary"></i>
            </a>
        </div>
    </div>
</header>

<section id="content" class="animated fadeIn">
    <div class="panel overflow" >
        <table class="table table-striped fs13" id="main-list">
            <thead>
                <tr class="bg-light">
                    <th>ID</th>
                    <th>用户ID</th>
                    <th>期号</th>
                    <th>押注对象</th>
                    <th>押注金额</th>
                    <th>返还金额</th>
                    <th class="sortable" data-field="created_at">开始时间</th>
                    <th class="sortable" data-field="updated_at">更新时间</th>
                </tr>
            </thead>
            <tbody class="admin-form">
                <% var moment = require('moment'); %>
                <% _.each(items, function(item){ %>
                    <tr data-id="<%= item.id %>">
                        <td><%= item.id %></td>
                        <td><a href="#stats/account/?id=<%= item.user_id %>"><%= item.user_id %></a></td>
                        <td><a href="#op/fruit/?term_number=<%= item.term_number %>"><%= item.term_number %></a></td>
                        <td><%= FRUIT_INDEX[item.bet_index] %></td>
                        <td><%= item.bet_amount %></td>
                        <td><%= item.award_amount %></td>
                        <td><%= item.created_at %></td>
                        <td><%= item.updated_at %></td>
                    </tr>
                <%
                }) %>
            </tbody>
        </table>
    </div>

    <div><div class="pull-left" id="page-tips"></div><div id="paginator"></div></div>
</section>

<!-- Start: Right Sidebar -->
<aside id="sidebar_right" class="nano">
    <div class="p20 admin-form">

        <h4 class="mt5 text-muted fw500">过滤条件：</h4>

        <hr class="short">

        <h6 class="fw400">期号</h6>
        <div class="section mb15">
            <label class="field select">
                <input title="期号" type="text" data-field="term_number" id="searchTerm" class="gui-input" placeholder="期号" value="<%= searched.term  %>">
                <i class="arrow double"></i>
            </label>
        </div>
        <h6 class="fw400">用户ID</h6>
        <div class="section mb15">
            <label class="field select">
                <input title="用户ID" type="text" data-field="user_id" id="searchUid" class="gui-input" placeholder="用户ID" value="<%= searched.uid  %>">
                <i class="arrow double"></i>
            </label>
        </div>
        <hr class="short">
        <h6 class="fw400">开始时间</h6>
        <div class="section row">
            <div class="col-md-6">
                    <input type="text" title="下限，包含当天" name="searchCreatedAtLower" id="searchCreatedAtLower" class="gui-input" data-type="date" value="<%= searched.created_at_lower %>">
                    </label>
                </label>
            </div>
            <div class="col-md-6">
                    <input type="text" title="上限，不包括当天" name="searchCreatedAtUpper" id="searchCreatedAtUpper" class="gui-input" data-type="date" value="<%= searched.created_at_upper %>">
                    </label>
                </label>
            </div>
        </div>

        <button class="btn btn-default btn-block" type="button" id="search">搜索</button>
</aside>
<!-- End: Right Sidebar -->
